home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / Pascal OS8 / Everything / DModelessStuffData.p < prev    next >
Encoding:
Text File  |  1998-10-30  |  2.3 KB  |  141 lines  |  [TEXT/CWIE]

  1. { DModelessStuffData.p -- data container class for Everything}
  2.  
  3. Unit DModelessStuffData;
  4. Interface
  5.  
  6. Uses
  7.     Types,
  8.     OSUtils,
  9.  
  10.  
  11.     AMSignaler;
  12.  
  13. const
  14.     idTools3        = longint ('Too3');
  15.     idFromValuesList4        = longint ('Fro5');
  16.     idFromMenu3        = longint ('Fro6');
  17.     idTextList3        = longint ('Tex6');
  18.  
  19. type
  20.     {----------}
  21.     DModelessStuffData    = object (AMSignaler)
  22.  
  23.     {data members}
  24.         mTools3:        SInt16;
  25.         mFromValuesList4:        SInt16;
  26.         mFromMenu3:        SInt16;
  27.         mTextList3:        SInt16;
  28.  
  29.     {methods}
  30.         Procedure Initialize; Override;
  31.  
  32.         Function  GetTools3: SInt16;
  33.         Procedure SetTools3    (inValue:        SInt16);
  34.         Function  GetFromValuesList4: SInt16;
  35.         Procedure SetFromValuesList4    (inValue:        SInt16);
  36.         Function  GetFromMenu3: SInt16;
  37.         Procedure SetFromMenu3    (inValue:        SInt16);
  38.         Function  GetTextList3: SInt16;
  39.         Procedure SetTextList3    (inValue:        SInt16);
  40.     end;
  41.  
  42. {----------}
  43. Function NewDModelessStuffData: DModelessStuffData;
  44.  
  45. {----------}
  46. Implementation
  47.  
  48. {----------}
  49. Function NewDModelessStuffData: DModelessStuffData;
  50. var
  51.     data:        DModelessStuffData;
  52. begin
  53.     data := nil;
  54.     New (data);
  55.     if data <> nil then begin
  56.         data.Initialize;
  57.     end;
  58.     NewDModelessStuffData := data;
  59. end;
  60.  
  61. {----------}
  62. Procedure DModelessStuffData.Initialize;
  63. begin
  64.     inherited Initialize;
  65.  
  66.     mTools3 := 0;
  67.     mFromValuesList4 := 0;
  68.     mFromMenu3 := 0;
  69.     mTextList3 := 0;
  70. end;
  71.  
  72. {----------}
  73. Function DModelessStuffData.GetTools3: SInt16;
  74. begin
  75.     GetTools3 := mTools3;
  76.  
  77.  
  78. end;
  79.  
  80. Procedure DModelessStuffData.SetTools3 (
  81.     inValue:        SInt16);
  82. begin
  83.     mTools3 := inValue;
  84.  
  85.  
  86.     SignalDataChanged (idTools3);
  87. end;
  88.  
  89. {----------}
  90. Function DModelessStuffData.GetFromValuesList4: SInt16;
  91. begin
  92.     GetFromValuesList4 := mFromValuesList4;
  93.  
  94.  
  95. end;
  96.  
  97. Procedure DModelessStuffData.SetFromValuesList4 (
  98.     inValue:        SInt16);
  99. begin
  100.     mFromValuesList4 := inValue;
  101.  
  102.  
  103.     SignalDataChanged (idFromValuesList4);
  104. end;
  105.  
  106. {----------}
  107. Function DModelessStuffData.GetFromMenu3: SInt16;
  108. begin
  109.     GetFromMenu3 := mFromMenu3;
  110.  
  111.  
  112. end;
  113.  
  114. Procedure DModelessStuffData.SetFromMenu3 (
  115.     inValue:        SInt16);
  116. begin
  117.     mFromMenu3 := inValue;
  118.  
  119.  
  120.     SignalDataChanged (idFromMenu3);
  121. end;
  122.  
  123. {----------}
  124. Function DModelessStuffData.GetTextList3: SInt16;
  125. begin
  126.     GetTextList3 := mTextList3;
  127.  
  128.  
  129. end;
  130.  
  131. Procedure DModelessStuffData.SetTextList3 (
  132.     inValue:        SInt16);
  133. begin
  134.     mTextList3 := inValue;
  135.  
  136.  
  137.     SignalDataChanged (idTextList3);
  138. end;
  139.  
  140. end.
  141.